-
Notifications
You must be signed in to change notification settings - Fork 143
Move more components to tsx #324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
this file is autogenerated, it should not be commited
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates several components to TypeScript and makes related configuration and dependency updates.
- Update esbuild loader in vite.config.ts from 'jsx' to 'tsx'.
- Migrate React components (IndexView, Frame, Affix) by removing PropTypes and adding TypeScript generics/interfaces.
- Update package.json with new type definitions and dependency overrides, and remove outdated documentation.
Reviewed Changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
vite.config.ts | Changed esbuild loader to support .tsx files. |
src/views/IndexView.tsx | Migrated component to TypeScript by adding RouteComponentProps to PureComponent. |
src/layouts/Frame.tsx | Removed PropTypes; updated component type with RouteComponentProps and adjusted imports. |
src/components/Affix.tsx | Replaced PropTypes with TS interfaces; improved type declarations and minor refactoring. |
package.json | Added new type definitions and dependency overrides. |
docs/index.html | Removed obsolete documentation file. |
Comments suppressed due to low confidence (1)
src/views/IndexView.tsx:50
- Ensure that RouteComponentProps provides all necessary properties for this component. If additional props are used, extend the interface accordingly to maintain clear API design.
class IndexView extends PureComponent<RouteComponentProps> {
"overrides": { | ||
"@reduxjs/toolkit": { | ||
".": "^1.9.7", | ||
"dependencies": { | ||
"react": "17.0.1" | ||
} | ||
}, | ||
"react-redux": { | ||
".": "^8.1.3", | ||
"react": "17.0.1" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review the dependency override for React to ensure it aligns with the requirements of the consuming packages. Forced version overrides can lead to compatibility issues in future updates.
"overrides": { | |
"@reduxjs/toolkit": { | |
".": "^1.9.7", | |
"dependencies": { | |
"react": "17.0.1" | |
} | |
}, | |
"react-redux": { | |
".": "^8.1.3", | |
"react": "17.0.1" | |
} | |
} | |
"overrides": {} |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove this when bumping to React 18+
React stopped publishing UMD builds since v19
No description provided.